package com.blb.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.baomidou.mybatisplus.annotation.TableId;
import java.io.Serializable;
import java.util.List;

import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * <p>
 * 
 * </p>
 *
 * @author HuaHao
 * @since 2019-11-20
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("t_categories")
public class Categories extends Model<Categories> {

    private static final long serialVersionUID=1L;

    @TableId(value = "id", type = IdType.AUTO)
    private String id;

    /**
     * 父级菜单id
     */
    private String pId;

    /**
     * 分类名称
     */
    private String name;

    /**
     * 添加人
     */
    private String userId;

    /**
     * 分类编号
     */
    private Integer mNumber;

    /**c
     * 分类介绍
     */
    private String mIntroduction;

    /**
     * 公司id
     */
    private String companyId;
    /**
     * 二级菜单集合
     */
    /*private List<Categories> categoriesList;*/

    @TableField(exist = false)
    private List<Categories> products;

    @TableField(exist = false)
    private String myId;

    @Override
    protected Serializable pkVal() {
        return this.id;
    }

}
